import requests
import httpx
import json



def func():
    url = 'http://nc.cli.im/qrcoderoute/qrcodeRouteNew'
    headers = {
        'Host': 'nc.cli.im',
        'Connection': 'keep-alive',
        # 'Content-Length': '300',
        'User-Agent': 'Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/53.0.2785.143 Safari/537.36 MicroMessenger/7.0.9.501 NetType/WIFI MiniProgramEnv/Windows WindowsWechat',
        'content-type': 'application/x-www-form-urlencoded',
        'Referer': 'https://servicewechat.com/wx5db79bd23a923e8e/1047/page-frame.html',
        'Accept-Encoding': 'gzip, deflate, br',
        # 'app_id'=wx5db79bd23a923e8e&password=null&qrcode_route=http%3A%2F%2Fqr61.cn%2Fo79fjA%2Fq6ctzQY&union_id=oBB5cs2cLvSQzO9RbgxAecvd58WY&open_id=odP8I0ZT0Ut8-t8jnve7z9GiY6dA&user_id=&time=1652839774&publickey=f5684a6e1b1c95c2df32bd79238f67b6&longitude=0&latitude=0&render_default_fields=0&render_edit_btn=1
          #app_id =wx5db79bd23a923e8e&password=null&qrcode_route=http%3A%2F%2Fqr61.cn%2Fo79fjA%2Fq6ctzQY&union_id=oBB5cs2cLvSQzO9RbgxAecvd58WY&open_id=odP8I0ZT0Ut8-t8jnve7z9GiY6dA&user_id=&time=1652839774&publickey=f5684a6e1b1c95c2df32bd79238f67b6&longitude=0&latitude=0&render_default_fields=0&render_edit_btn=1
    }
    data = json.dumps({
        'app_id': 'wx5db79bd23a923e8e',
        'password': None,
        'qrcode_route': 'http%3A%2F%2Fqr61.cn%2Fo79fjA%2Fq6ctzQY',
        'union_id': 'oBB5cs2cLvSQzO9RbgxAecvd58WY',
        'open_id': 'odP8I0ZT0Ut8-t8jnve7z9GiY6dA',
        'user_id': '',
        'time': '1652839774',
        'publickey': 'f5684a6e1b1c95c2df32bd79238f67b6',
        'longitude': 0,
        'latitude': 0,
        'render_default_fields': 0,
        'render_edit_btn': 1

    })
    auth = 'app_id=wx5db79bd23a923e8e&password=null&qrcode_route=http%3A%2F%2Fqr61.cn%2Fo79fjA%2Fq6ctzQY&union_id=oBB5cs2cLvSQzO9RbgxAecvd58WY&open_id=odP8I0ZT0Ut8-t8jnve7z9GiY6dA&user_id=&time=1652839774&publickey=f5684a6e1b1c95c2df32bd79238f67b6&longitude=0&latitude=0&render_default_fields=0&render_edit_btn=1'

    response = requests.post(url, headers=headers,json=data).text
    print(response)


if __name__ == '__main__':
    func()
